package com.syezon.wifikey.ad.config;

import com.syezon.android.base.utils.SPUtils;

/**
 * Created by Administrator on 2018/9/21.
 */

public class AdConfig {
    private static final String CONFIG_NAME = "ad_config";
    private static final String AD_CLICK_PREFIX = "ad_click_";

    /**
     * @param id
     * @return true 点击了 false 没点击
     */
    public static boolean isClicked(String id) {
        return SPUtils.getInstance(CONFIG_NAME).getBoolean(AD_CLICK_PREFIX + id, false);
    }

    /**
     * @param id    广告id
     * @param click 保存广告是否点击
     */
    public static void setClick(String id, boolean click) {
        SPUtils.getInstance(CONFIG_NAME).put(AD_CLICK_PREFIX + id, click);
    }
}
